home *** CD-ROM | disk | FTP | other *** search
/ All for Cell Phones: Sony Ericsson / Sony-Ericsson 2004.iso / Java / Chains / Chains.jar / Chains$LoadThread.class (.txt) < prev    next >
Encoding:
Java Class File  |  2002-08-14  |  1.9 KB  |  46 lines

  1. import javax.microedition.lcdui.Displayable;
  2. import javax.microedition.lcdui.Form;
  3. import javax.microedition.rms.RecordStore;
  4.  
  5. class Chains$LoadThread extends Thread {
  6.    // $FF: renamed from: d javax.microedition.lcdui.Displayable
  7.    Displayable field_0;
  8.    // $FF: synthetic field
  9.    private final Chains this$0;
  10.  
  11.    public Chains$LoadThread(Chains var1, Displayable var2) {
  12.       this.this$0 = var1;
  13.       this.field_0 = var2;
  14.    }
  15.  
  16.    public void run() {
  17.       try {
  18.          this.this$0.form.removeCommand(Chains.cont);
  19.          Chains.progGauge.setValue(20);
  20.          RecordStore var1 = RecordStore.openRecordStore("saveGame", true);
  21.          Chains.progGauge.setValue(40);
  22.          this.this$0.canvas.deserialise(var1.getRecord(1));
  23.          Chains.progGauge.setValue(60);
  24.          var1.closeRecordStore();
  25.          Chains.progGauge.setValue(80);
  26.          RecordStore.deleteRecordStore("saveGame");
  27.          Chains.progGauge.setValue(100);
  28.          Chains.display.setCurrent(this.this$0.canvas);
  29.          this.this$0.inGame = true;
  30.       } catch (Exception var5) {
  31.          Form var2 = new Form("Phone Error");
  32.          var2.append("There was an error loading your game.");
  33.          ((Displayable)var2).addCommand(Chains.instQuit);
  34.          ((Displayable)var2).setCommandListener(Chains.access$0(this.this$0));
  35.          Chains.display.setCurrent(var2);
  36.          this.this$0.canvas.reset();
  37.  
  38.          try {
  39.             RecordStore.deleteRecordStore("saveGame");
  40.          } catch (Exception var4) {
  41.          }
  42.       }
  43.  
  44.    }
  45. }
  46.